package com.javafamily.familydemo.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
// @JsonPropertyOrder(value = {"varieties","name"})
public class Pets {
   // @JsonProperty("petsId")
    private long id;
    private String name;
    private String varieties;
   // @JsonIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
  //  @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<Customer> customer;


    private void init() {
        System.out.println("Hello pets!");
    }

    private void destroy() {
        System.out.println("GoodBye pets!");
    }
}

